how to save user settings in c